From: Florian Müllner Date: Fri, 12 Jan 2024 11:17:17 +0000 (+0100) Subject: tools/toolbox: Consistently handle option parsing failures X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~2^2~144 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=26e8408b927cda14fe6d52fd842f8532cfc83bcd;p=gnome-shell.git tools/toolbox: Consistently handle option parsing failures `getopt` already prints a message on parse errors, but it still seems like good style to point to --help as we do elsewhere. Part-of: --- diff --git a/tools/toolbox/create-toolbox.sh b/tools/toolbox/create-toolbox.sh index ba240c537..5c06021e0 100755 --- a/tools/toolbox/create-toolbox.sh +++ b/tools/toolbox/create-toolbox.sh @@ -96,7 +96,7 @@ TEMP=$(getopt \ --longoptions 'skip-mutter' \ --longoptions 'set-default' \ --longoptions 'help' \ - -- "$@") + -- "$@") || die "Run $(basename $0) --help to see available options" eval set -- "$TEMP" unset TEMP diff --git a/tools/toolbox/meson-build.sh b/tools/toolbox/meson-build.sh index 0f5923bb8..82234f119 100755 --- a/tools/toolbox/meson-build.sh +++ b/tools/toolbox/meson-build.sh @@ -50,7 +50,7 @@ TEMP=$(getopt \ --longoptions 'toolbox:' \ --longoptions 'dist' \ --longoptions 'help' \ - -- "$@") + -- "$@") || die "Run $(basename $0) --help to see available options" eval set -- "$TEMP" unset TEMP